package events;

import java.util.EventObject;

import org.jnetpcap.packet.JHeader;

import router.ProtocolPacketReceiver;

/**
 * Ereignis, das bei eingeheden Paketen ausgelöst wird.
 * @author pascal
 *
 */
public class ReceivedEvent extends EventObject {
	
	/**
	 * Das eingehende Paket.
	 */
	private JHeader packet;
	
	/**
	 * Der empfangende ProtocolPacketReceiver.
	 */
	private ProtocolPacketReceiver source;
	
	public ReceivedEvent(ProtocolPacketReceiver source, JHeader packet) {
		super(source);
		this.packet = packet;
		this.source = source;
	}
	
	public JHeader getProtocolPacket(){
		return this.packet;
	}
	
	public ProtocolPacketReceiver getSource(){
		return this.source;
	}
	
	
}
